About the User Authentication Demo

The XML Caching feature can be used together with Bdp to create applications that mimic the Midas briefcase model, except that the caching is done on the server rather than on the client. Changes have been made to the application's Web.Config file to work with Form Authentication , and DBWeb is able to access the Client's user name and use it to store changes with a unique copy of the Xml file. The code in Login.cs takes care of logging on and storing EmailAddress/Password information to User.xml. Note that the DBWebDataSource has its AutoApplyCache and UseUniqueFileName properties set to true. It also has anOnApplyChangesEvent calling the BdpDataAdapter's AutoUpdate() method.

The first time the application is run, the file specified by the XmlSchemaName property (employee) will be created using the server metadata. (Warning: if you change this application so that the metadata changes after the application has already been run, be sure to delete the .xsd file, or a mismatch between the .xsd file and the server metadata will result in runtime errors and unpredictable behavior!)

The first time each client runs the application, the data is retrieved from the server. Subsequently, any time the client changes data, those changes are saved on the server to a unique filename based on the username. This means that if the client shuts down and returns the next day, his/her own copy of the data is restored, and changes can be UNDONE. Whenever ApplyChanges is successfully called, the unique user files are deleted

Setup Information

Running the Demo

  1. Start the IDE.
  2. Open this project.
  3. Complete the steps from the Setup Information section above.
  4. Compile the Applicaton (Project Menu, Compile all projects).
  5. Run the application with debugging (F9) or without debugging (Shift+Ctrl+F9)